<?php
include 'header.php';
?>
<div style="margin-left:20px">
<h2>Daftar Produk</h2>
</div>
<?php
if(count($produk)){
		foreach($produk as $rows){
	
	//var_dump($rows);
	
	  ?>
<div class="panel panel-primary" style="margin-right:10px">
  <!-- Default panel contents -->
  <div class="panel-heading">
  </div>
  <div class="panel-body">
   <div class="hero-unit">
		<form action="<?php echo base_url().'index.php/produk/edit_tag/'.$rows['id_produk'] ?>" method="post">
			<div class="media">
				<a class="pull-left" href="#">
					<img class="media-object" src="<?php echo base_url().$rows['gambar']; ?> " height="50" alt="">
				</a>
				<div class="media-body">
					<h4 class="media-heading"><?php echo $rows['nama_produk']; ?></h4>
					<?php 
					echo $rows['ket_produk'];
					?>
					</div>
					<p>
					Tags:
					<?php
					foreach($rows['tag'] as $tag){
					echo $tag['keyword'];
					echo ' ';
					}
					?>
					</p>
					<p>
					Tag lama:
					<input type="text" name='keyword_lama' placeholder="masukkan tag">
					<br />
					Tag baru:
					<input type="text" name='keyword_baru' placeholder="masukkan tag">
					</p>			
					<p>
                        	<button class="btn btn-primary btn-large">Edit Tag</button>
                    </p>
				</div>
			</form>
	</div>
	</div>
      
	  
   </div>
</div>

</div>
<?php
}
?>

<?php
}

?>